import com.powerfl.frm.TAF.*;

static public function non( $start:Number, $length:Number, $rate:Number):Number{
	return $start + $length;
}
static public function lin( $start:Number, $length:Number, $rate:Number):Number{
	return $start + $length*$rate;
}

//static public function sii( $start:Number, $length:Number, $rate:Number):Number{
//	return $start + $length*TAF.SELF.mathSin( $rate*TAF.SELF.mathPIhalf );
//}
//static public function sio( $start:Number, $length:Number, $rate:Number):Number{
//	return $start + $length - $length*TAF.SELF.mathCos( $rate*TAF.SELF.mathPIhalf );
//}

static public function cii( $start:Number, $length:Number, $rate:Number):Number{
	return $start + $length*( 1 - TAF.SELF.mathSqrt( 1 - $rate*$rate ) );
}
static public function cio( $start:Number, $length:Number, $rate:Number):Number{
	$rate = 1 -  $rate;
	return $start + $length*( TAF.SELF.mathSqrt( 1 - $rate*$rate ) );
}

static public var back:Number = 1.70158;
static public function bai( $start:Number, $length:Number, $rate:Number):Number{
	return $start + $length*( $rate*$rate*( ( back + 1 )*$rate - back ) );
}

static public function bao( $start:Number, $length:Number, $rate:Number):Number{
	$rate = $rate - 1;
	return $start + $length*( $rate*$rate*( ( back + 1 )*$rate + back ) + 1 );
}

static public function boi( $start:Number, $length:Number, $rate:Number):Number{
	$rate = 1 - $rate;
	if( $rate < .36){
		return $start + $length*( 1 -  7.5625*$rate*$rate );
	}else if($rate < .72 ){
		$rate = $rate - .54;
		return $start + $length*( 1 - 7.5625*$rate*$rate + 0.75 );
	}else if($rate < .9 ){
		$rate = $rate - .818;
		return $start + $length*( 1 - 7.5625*$rate*$rate + 0.9375);
	}else{
		$rate = $rate - .954;
		return $start + $length*( 1 - 7.5625*$rate*$rate + 0.984375);
	}
}

static public function boo( $start:Number, $length:Number, $rate:Number):Number{
	if( $rate < .36){
		return $start + $length*( 7.5625*$rate*$rate );
	}else if( $rate < .72 ){
		$rate = $rate - .54;
		return $start + $length*( 7.5625*$rate*$rate + 0.75 );
	}else if( $rate < .9 ){
		$rate = $rate - .818;
		return $start + $length*( 7.5625*$rate*$rate + 0.9375);
	}else{
		$rate = $rate - .954;
		return $start + $length*( 7.5625*$rate*$rate + 0.984375);
	}
}